--- /dev/null
+uniform float progress;
+uniform sampler2D u_texture1;
+uniform sampler2D u_texture2;
+
+vec4 getFromColor (vec2 uv) {
+ return GskTexture(u_texture1, uv);
+}
+
+vec4 getToColor (vec2 uv) {
+ return GskTexture(u_texture2, uv);
+}
+
+// Source: https://gl-transitions.com/editor/crosswarp
+// Author: Eke Péter <peterekepeter@gmail.com>
+// License: MIT
+
+vec4 transition(vec2 p) {
+ float x = progress;
+ x=smoothstep(.0,1.0,(x*2.0+p.x-1.0));
+ return mix(getFromColor((p-.5)*(1.-x)+.5), getToColor((p-.5)*x+.5), x);
+}
+
+
+void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
+{
+ fragColor = transition(uv);
+}
<file>gtkshaderbin.c</file>
<file>gskshaderpaintable.h</file>
<file>gskshaderpaintable.c</file>
+ <file>wind.glsl</file>
+ <file>radial.glsl</file>
+ <file>crosswarp.glsl</file>
+ <file>kaleidoscope.glsl</file>
+ <file>cogs2.glsl</file>
<file>ripple.glsl</file>
<file>background.glsl</file>
- <file>transition1.glsl</file>
- <file>transition2.glsl</file>
- <file>transition3.glsl</file>
- <file>transition4.glsl</file>
- <file>cogs2.glsl</file>
</gresource>
<gresource prefix="/iconscroll">
<file>iconscroll.ui</file>
gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);
gtk_grid_attach (GTK_GRID (grid),
- make_shader_stack ("Wind", "/gltransition/transition1.glsl", 0, scale),
+ make_shader_stack ("Wind", "/gltransition/wind.glsl", 0, scale),
0, 0, 1, 1);
gtk_grid_attach (GTK_GRID (grid),
- make_shader_stack ("Radial", "/gltransition/transition2.glsl", 1, scale),
+ make_shader_stack ("Radial", "/gltransition/radial.glsl", 1, scale),
1, 0, 1, 1);
gtk_grid_attach (GTK_GRID (grid),
- make_shader_stack ("Crosswarp", "/gltransition/transition3.glsl", 2, scale),
+ make_shader_stack ("Crosswarp", "/gltransition/crosswarp.glsl", 2, scale),
0, 1, 1, 1);
gtk_grid_attach (GTK_GRID (grid),
- make_shader_stack ("Kaleidoscope", "/gltransition/transition4.glsl", 3, scale),
+ make_shader_stack ("Kaleidoscope", "/gltransition/kaleidoscope.glsl", 3, scale),
1, 1, 1, 1);
return window;
--- /dev/null
+uniform float progress;
+uniform sampler2D u_texture1;
+uniform sampler2D u_texture2;
+
+vec4 getFromColor (vec2 uv) {
+ return GskTexture(u_texture1, uv);
+}
+
+vec4 getToColor (vec2 uv) {
+ return GskTexture(u_texture2, uv);
+}
+
+// Source: https://gl-transitions.com/editor/kaleidoscope
+// Author: nwoeanhinnogaehr
+// License: MIT
+
+const float speed = 1.0;
+const float angle = 1.0;
+const float power = 1.5;
+
+vec4 transition(vec2 uv) {
+ vec2 p = uv.xy / vec2(1.0).xy;
+ vec2 q = p;
+ float t = pow(progress, power)*speed;
+ p = p -0.5;
+ for (int i = 0; i < 7; i++) {
+ p = vec2(sin(t)*p.x + cos(t)*p.y, sin(t)*p.y - cos(t)*p.x);
+ t += angle;
+ p = abs(mod(p, 2.0) - 1.0);
+ }
+ abs(mod(p, 1.0));
+ return mix(
+ mix(getFromColor(q), getToColor(q), progress),
+ mix(getFromColor(p), getToColor(p), progress), 1.0 - 2.0*abs(progress - 0.5));
+}
+
+
+void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
+{
+ fragColor = transition(uv);
+}
--- /dev/null
+uniform float progress;
+uniform sampler2D u_texture1;
+uniform sampler2D u_texture2;
+
+vec4 getFromColor (vec2 uv) {
+ return GskTexture(u_texture1, uv);
+}
+
+vec4 getToColor (vec2 uv) {
+ return GskTexture(u_texture2, uv);
+}
+
+// Source: https://gl-transitions.com/editor/Radial
+// License: MIT
+// Author: Xaychru
+
+const float smoothness = 1.0;
+
+const float PI = 3.141592653589;
+
+vec4 transition(vec2 p) {
+ vec2 rp = p*2.-1.;
+ return mix(
+ getToColor(p),
+ getFromColor(p),
+ smoothstep(0., smoothness, atan(rp.y,rp.x) - (progress-.5) * PI * 2.5)
+ );
+}
+
+
+void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
+{
+ fragColor = transition(uv);
+}
+++ /dev/null
-uniform float progress;
-uniform sampler2D u_texture1;
-uniform sampler2D u_texture2;
-
-vec4 getFromColor (vec2 uv) {
- return GskTexture(u_texture1, uv);
-}
-
-vec4 getToColor (vec2 uv) {
- return GskTexture(u_texture2, uv);
-}
-
-// Source: https://gl-transitions.com/editor/wind
-// Author: gre
-// License: MIT
-
-const float size = 0.2;
-
-float rand(vec2 co) {
- return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
-}
-
-vec4 transition(vec2 p) {
- float r = rand(vec2(0, p.y));
- float m = smoothstep(0.0, -size, p.x*(1.0-size) + size*r - (progress * (1.0 + size)));
- return mix(getFromColor(p), getToColor(p), m);
-}
-
-
-void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
-{
- fragColor = transition(uv);
-}
+++ /dev/null
-uniform float progress;
-uniform sampler2D u_texture1;
-uniform sampler2D u_texture2;
-
-vec4 getFromColor (vec2 uv) {
- return GskTexture(u_texture1, uv);
-}
-
-vec4 getToColor (vec2 uv) {
- return GskTexture(u_texture2, uv);
-}
-
-// Source: https://gl-transitions.com/editor/Radial
-// License: MIT
-// Author: Xaychru
-
-const float smoothness = 1.0;
-
-const float PI = 3.141592653589;
-
-vec4 transition(vec2 p) {
- vec2 rp = p*2.-1.;
- return mix(
- getToColor(p),
- getFromColor(p),
- smoothstep(0., smoothness, atan(rp.y,rp.x) - (progress-.5) * PI * 2.5)
- );
-}
-
-
-void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
-{
- fragColor = transition(uv);
-}
+++ /dev/null
-uniform float progress;
-uniform sampler2D u_texture1;
-uniform sampler2D u_texture2;
-
-vec4 getFromColor (vec2 uv) {
- return GskTexture(u_texture1, uv);
-}
-
-vec4 getToColor (vec2 uv) {
- return GskTexture(u_texture2, uv);
-}
-
-// Source: https://gl-transitions.com/editor/crosswarp
-// Author: Eke Péter <peterekepeter@gmail.com>
-// License: MIT
-
-vec4 transition(vec2 p) {
- float x = progress;
- x=smoothstep(.0,1.0,(x*2.0+p.x-1.0));
- return mix(getFromColor((p-.5)*(1.-x)+.5), getToColor((p-.5)*x+.5), x);
-}
-
-
-void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
-{
- fragColor = transition(uv);
-}
+++ /dev/null
-uniform float progress;
-uniform sampler2D u_texture1;
-uniform sampler2D u_texture2;
-
-vec4 getFromColor (vec2 uv) {
- return GskTexture(u_texture1, uv);
-}
-
-vec4 getToColor (vec2 uv) {
- return GskTexture(u_texture2, uv);
-}
-
-// Source: https://gl-transitions.com/editor/kaleidoscope
-// Author: nwoeanhinnogaehr
-// License: MIT
-
-const float speed = 1.0;
-const float angle = 1.0;
-const float power = 1.5;
-
-vec4 transition(vec2 uv) {
- vec2 p = uv.xy / vec2(1.0).xy;
- vec2 q = p;
- float t = pow(progress, power)*speed;
- p = p -0.5;
- for (int i = 0; i < 7; i++) {
- p = vec2(sin(t)*p.x + cos(t)*p.y, sin(t)*p.y - cos(t)*p.x);
- t += angle;
- p = abs(mod(p, 2.0) - 1.0);
- }
- abs(mod(p, 1.0));
- return mix(
- mix(getFromColor(q), getToColor(q), progress),
- mix(getFromColor(p), getToColor(p), progress), 1.0 - 2.0*abs(progress - 0.5));
-}
-
-
-void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
-{
- fragColor = transition(uv);
-}
--- /dev/null
+uniform float progress;
+uniform sampler2D u_texture1;
+uniform sampler2D u_texture2;
+
+vec4 getFromColor (vec2 uv) {
+ return GskTexture(u_texture1, uv);
+}
+
+vec4 getToColor (vec2 uv) {
+ return GskTexture(u_texture2, uv);
+}
+
+// Source: https://gl-transitions.com/editor/wind
+// Author: gre
+// License: MIT
+
+const float size = 0.2;
+
+float rand(vec2 co) {
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
+}
+
+vec4 transition(vec2 p) {
+ float r = rand(vec2(0, p.y));
+ float m = smoothstep(0.0, -size, p.x*(1.0-size) + size*r - (progress * (1.0 + size)));
+ return mix(getFromColor(p), getToColor(p), m);
+}
+
+
+void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
+{
+ fragColor = transition(uv);
+}